(function(win,doc){
    function change(){
    	doc.documentElement.style.fontSize=doc.documentElement.clientWidth/375*23.4375+'px';
	}
    change();
    win.addEventListener('resize',change,false);   
})(window,document);
$(function() {


	var len;
	for(var i=0; i<$('.vsbot ul').length; i++){
		len = $('.vsbot ul').eq(i).children('li').length;
		if(len < 6){
			$('.vsbot ul').eq(i).width($('.vsbot ul').eq(i).children('li').width()*(len+1)-10);
		}else{
			$('.vsbot ul').eq(i).width($('.vsbot ul').eq(i).children('li').width()*7-10);
			$('.vsbot ul').eq(i).parent().children('b').css('display','block');
		}
	}
	$('.layer').height($(window).height());
    $('.layer_enter').height($(window).height());
    // 点击投票
    $('.vote>a').click(function() {
     //  $('.layer').css('display','block');
    });
    // 弹出层消失
    $('.layer').click(function() {
        $('.layer').css('display','none');
    });

    $('.layer>div').click(function() {
        event.stopPropagation();
    });

    //第一次进入页面弹层
   /* var caches1 = $('.caches').val();
    if(caches1 == ''){
        $('.layer_enter').css('display','block');
        $('.dowmloadFooter').css('display','none');
    }*/

    $('.img').click(function() {
        $('.layer_enter').css('display','none');
        $('.dowmloadFooter').css('display','block');
    });



    $('.layer_enter .Imgclose').click(function(){
        $('.layer_enter').css('display','none');
        $('.dowmloadFooter').css('display','block');
    });

            // 拉开收起
        $('.downBtn img').eq(0).click(function(){
            if($(this).attr('src')=="business/style/vote/style/down.png"){
                $(this).attr('src','business/style/vote/style/up.png');
                $(this).parent().parent(".votePerson").css("height","auto")
            }else{
                $(this).attr('src','business/style/vote/style/down.png')
                $(this).parent().parent(".votePerson").css("height","3.3rem")
            }
        });


        $('.downBtn img').eq(1).click(function(){
            if($(this).attr('src')=="business/style/vote/style/down.png"){
                $(this).attr('src','business/style/vote/style/up.png');
                $(this).parent().parent(".votePerson1").css("height","auto")
            }else{
                $(this).attr('src','business/style/vote/style/down.png')
                $(this).parent().parent(".votePerson1").css("height","11rem")
            }
        });
        // 拉开收起
});